package cn.source.system.service.impl;

import cn.source.common.utils.SecurityUtils;
import cn.source.system.domain.HouseHeart;
import cn.source.system.domain.HouseRoom;
import cn.source.system.mapper.HouseHeartMapper;
import cn.source.system.service.IHouseHeartService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class HouseHeartServiceImpl implements IHouseHeartService {

    private HouseHeartMapper houseHeartMapper;
    @Override
    public int addHeart(HouseHeart houseHeart){
        houseHeart.setUserId(SecurityUtils.getWxUserId());
//        houseHeartMapper.getHouse
//        if(!heart){
//            // 收藏
//            houseHeartMapper.saveHeart(houseHeart);
//        }else {
//            // 取消收藏
//            houseHeartMapper.cancelHeart(houseHeart);
//            msg = "取消收藏";
//        }
        return 1;
    }

    @Override
    public List<HouseRoom> getHouseHeartList(){
        return houseHeartMapper.getHouseHeartList(SecurityUtils.getWxUserId());
    }
}
